package test.domain.environment;

import java.util.Properties;

public class Database implements Environment<Database>  {
	private String type;
	private String className;
	private String ip;
	private String port;
	private String name;
	private String username;
	private String password;
	
	public Database initialize(Properties prop) {
		this.type = prop.getProperty("openfire.db.type");
		this.className = prop.getProperty("openfire.db.driver");
		this.ip = prop.getProperty("openfire.db.ip", "127.0.0.1");
		this.port = prop.getProperty("openfire.db.port");
		this.name = prop.getProperty("openfire.db.name", "openfire");
		this.username = prop.getProperty("openfire.db.username", "openfire");
		this.password = prop.getProperty("openfire.db.password", "welcome1");
		
		return this;
	}
	
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getClassName() {
		return className;
	}
	public void setClassName(String className) {
		this.className = className;
	}
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	public String getPort() {
		return port;
	}
	public void setPort(String port) {
		this.port = port;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
}
